package com.bes.opslink.aiops.system.api.client.user;

import com.bes.opslink.aiops.commons.dto.base.R;
import com.bes.opslink.aiops.system.api.commons.UserApiConstants;
import com.bes.opslink.aiops.system.api.dto.user.UserDTO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * 用户feign接口
 */
@FeignClient(value = UserApiConstants.USER_API_CLIENT_VALUE, path = UserApiConstants.USER_API_CLIENT_PATH + "/user", contextId = "UserClient")
public interface UserClient {
    /**
     * 根据用户ID查询用户信息
     *
     * @param id 用户ID
     * @return 用户信息
     */
    @GetMapping("/{id}")
    R<UserDTO> getById(@PathVariable("id") Long id);
}
